#include "add_group.h"
#include "ui_add_group.h"
#include "databasemanager.h"

add_group* add_group::instance=nullptr;
add_group::add_group(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::add_group)
{
    ui->setupUi(this);
}

add_group::~add_group()
{
    delete ui;
}

add_group *add_group::getInstance(QWidget *parent)
{
    if(instance==nullptr)
    {
        instance=new add_group(parent);
    }
    return instance;
}

void add_group::destoryInstance()
{
    if(instance)
    {
        qDebug()<<"delete add_group";
        delete instance;
        instance=nullptr;
    }
}
